import com.alibaba.dubbo.demo.api.IBookService;
import com.alibaba.dubbo.demo.model.Book;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.List;

/**
 * @Author:chenjinhang
 * @Description:
 * @Date: create in 16:36 2018/2/7
 **/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:dubbo-customer.xml"})
public class testBook {

    @Autowired
    private IBookService bookService;

    @Test
    public void getAllTest(){
        List<Book> books = bookService.getAllBooks();
        for(Book book : books) {
            System.out.println(book.toString());
        }
    }
}
